package com.zhijian.medical.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 一代测序实验状态枚举类
 *
 * @author HCG
 * @version 1.0
 * @date 2022/8/12
 */
@AllArgsConstructor
@Getter
public enum SangerStatusEnum {

    ZB(0, "准备"),
    SJPZQ(1, "试剂配置区"),
    HSZBQ(2, "核酸制备区"),
    HSKZYQ(3, "核酸扩增一区"),
    CWFXYQ(4, "产物分析一区"),
    HSCHYQ1(5, "核酸纯化一区（普通PCR产物纯化）"),
    HSCHYQ2(6, "核酸纯化一区 （测序PCR试剂配制与加样）"),
    HSKZEQ1(7, "核酸扩增二区 （测序PCR反应）"),
    HSCHEQ(8, "核酸纯化二区 （测序PCR产物纯化）、核酸扩增二区（变性）"),
    CXQ(9, "测序区（毛细管电泳）"),
    SJFX(10, "数据分析（测序区、分子诊断室）"),
    END(12, "已完成"),;

    private Integer code;
    private String desc;

    public static SangerStatusEnum getByCode(Integer code) {
        SangerStatusEnum[] values = SangerStatusEnum.values();
        for (SangerStatusEnum anEnum : values) {
            if (anEnum.getCode().equals(code)) {
                return anEnum;
            }
        }
        return null;
    }
}
